home *** CD-ROM | disk | FTP | other *** search
/ NEXT Generation: Next View / Next Generation Disc Magazine 1 (1996).ISO / pc / start31.exe / start31.dxr / 00004.ls < prev    next >
Encoding:
Text File  |  1996-08-26  |  2.0 KB  |  84 lines

  1. on startMovie
  2.   openXLib("fileio")
  3.   set the volume of sound 1 to 255
  4.   set the volume of sound 2 to 255
  5.   if the quickTimePresent = 1 then
  6.     go("begin")
  7.   else
  8.   end if
  9. end
  10.  
  11. on fileExists fileName
  12.   set file to FileIO(mnew, "read", fileName)
  13.   if objectp(file) then
  14.     file(mdispose)
  15.     return 1
  16.   else
  17.     return 0
  18.   end if
  19. end
  20.  
  21. on getdrive
  22.   if the machineType < 256 then
  23.     set volumetext to OSVolumeList()
  24.     set vollist to cvtTextToList(me, volumetext)
  25.   else
  26.     set vollist to []
  27.     repeat with index = 3 to 26
  28.       set drive to numToChar(64 + index) & ":\"
  29.       add(vollist, drive)
  30.     end repeat
  31.     add(vollist, EMPTY)
  32.   end if
  33.   if the machineType = 256 then
  34.     set filesep to "\"
  35.   else
  36.     set filesep to ":"
  37.   end if
  38.   set drive to EMPTY
  39.   repeat with volume in vollist
  40.     put volume
  41.     if fileExists(volume & "Media\Tommy.dxr") then
  42.       set drive to volume
  43.       exit repeat
  44.     end if
  45.   end repeat
  46.   if drive = EMPTY then
  47.     alert("Your CD could not be found. Please insert it into the drive and try again.")
  48.     return 0
  49.   else
  50.     return drive
  51.   end if
  52. end
  53.  
  54. on Jumpmovie moviePath
  55.   global numtries
  56.   set numtries to numtries + 1
  57.   set drive to getdrive()
  58.   if stringp(drive) then
  59.     go(1, drive & moviePath)
  60.   else
  61.     if numtries < 3 then
  62.       Jumpmovie(moviePath)
  63.     else
  64.       alert("The Net Power CD could not be found. This program will now quit as gracefully as possible under the circumstances, though you should really try to get a copy of the Net Power because it contains some truly cool stuff.")
  65.       halt()
  66.     end if
  67.   end if
  68. end
  69.  
  70. on launch moviePath
  71.   global numtries
  72.   set drive to getdrive()
  73.   if stringp(drive) then
  74.     open(drive & moviePath)
  75.   else
  76.     if numtries = 1 then
  77.       open(moviePath)
  78.     else
  79.       alert("The Net Power CD could not be found. This program will now quit as gracefully as possible under the circumstances, though you should really try to get a copy of the Net Power because it contains some truly cool stuff.")
  80.       halt()
  81.     end if
  82.   end if
  83. end
  84.